package eleanor.ltd.isne.entities.pages.action;

import java.io.Serializable;

import javax.persistence.Embeddable;
import javax.persistence.ManyToOne;

import eleanor.ltd.isne.entities.action.Action;
import eleanor.ltd.isne.entities.pages.Pages;

@Embeddable
public class PagesActionPK implements Serializable{

	@ManyToOne
	private Action action;
	@ManyToOne
	private Pages pages;
	
	public Action getAction() {
		return action;
	}
	public void setAction(Action action) {
		this.action = action;
	}
	public Pages getPages() {
		return pages;
	}
	public void setPages(Pages pages) {
		this.pages = pages;
	}
	
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		PagesActionPK that = (PagesActionPK) o;

		if (action != null ? !action.equals(that.action) : that.action != null)
			return false;
		if (pages != null ? !pages.equals(that.pages)
				: that.pages != null)
			return false;

		return true;
	}
	
}
